Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/pratyush1718/counselor get route #67

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

pratyush1718
Copy link
Contributor

@pratyush1718 pratyush1718 commented Feb 17, 2025

Tracking Info

Resolves #49

Changes

Added a counselor route/controller to get counselor information to populate counselor table. Also added 2 dummy documents in our mongodb user collection to test with.

MISC: also merged index.ts and app.ts into one file (app.ts under the src folder)

Testing

Postman testing

Confirmation of Change

image

Copy link
Member

@Miyuki-L Miyuki-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor changes and fix the fixable linter issues.

Forgot that designers initially used counslors to mean members.



const app: Express = express();
const port = process.env.PORT ?? 3000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set the default port to 3001, 3000 is where frontend is running


app.use(express.json());

app.use("/api/user", userRoutes);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the other routes that were added in the old index.ts file as well. They should have already been merged into main

@@ -58,6 +60,15 @@ export const getAllUsers = (_req: Request, res: Response) => {
}
};

export const getAllCounselors: RequestHandler = async (_req, res, next) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get all members.

I forgot for this route we intend to just get all members.

Designers chagned the wording from counselors to member

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should get all the users

@Miyuki-L Miyuki-L mentioned this pull request Mar 1, 2025
@pratyush1718 pratyush1718 requested a review from Miyuki-L March 1, 2025 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backend Call Manage Counselors to populate the table
2 participants